class yumlocal::repos_emi3 {

  case $operatingsystemmajrelease {
  '5': {
     yumrepo { "EMI_3_base":
        baseurl => "http://202.122.33.67/yum/emi/3/sl5/x86_64/base",
        descr   => "EMI_3_base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_contribs":
        baseurl => "http://202.122.33.67/yum/emi/3/sl5/x86_64/contribs",
        descr   => "EMI_3_contribs",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_third-party":
        baseurl => "http://202.122.33.67/yum/emi/3/sl5/x86_64/third-party",
        descr   => "EMI_3_third-party",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_updates":
        baseurl => "http://202.122.33.67/yum/emi/3/sl5/x86_64/updates",
        descr   => "EMI_3_updates",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
    }
  }
  case $operatingsystemmajrelease {
  '6': {
     yumrepo { "EMI_3_base":
        baseurl => "http://202.122.33.67/yum/emi/3/sl6/x86_64/base",
        descr   => "EMI_3_base",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_contribs":
        baseurl => "http://202.122.33.67/yum/emi/3/sl6/x86_64/contribs",
        descr   => "EMI_3_contribs",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_third-party":
        baseurl => "http://202.122.33.67/yum/emi/3/sl6/x86_64/third-party",
        descr   => "EMI_3_third-party",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
     yumrepo { "EMI_3_updates":
        baseurl => "http://202.122.33.67/yum/emi/3/sl6/x86_64/updates",
        descr   => "EMI_3_updates",
        enabled => 1,
        gpgcheck => 0,
        priority => 40,
        before   => Yumrepo['site']
     }
    }
  }

   yumrepo { "EGI-trustanchors":
      baseurl => "http://202.122.33.67/yum/ca",
      descr   => "EGI-trustanchors",
      enabled => 1,
      gpgcheck => 0,
      priority => 43,
      before   => Yumrepo['site']
   }
   yumrepo { "wlcg":
      baseurl => "http://202.122.33.67/yum/wlcg/sl${operatingsystemmajrelease}/x86_64",
      descr   => "wlcg",
      enabled => 1,
      gpgcheck => 0,
      priority => 43,
      before   => Yumrepo['site']
   }
}
